export class StateMachine {
  constructor(initial) { this.state = initial; }
  set(state) { this.state = state; }
  is(state) { return this.state === state; }
}